﻿using SYMetro.Domain.Modal.Membership;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YiDa.Domain.Repositories;

namespace SYMetro.Domain.Repository.Membership
{
    public interface IRoleRepository : IRepository<Role>
    {
        /// <summary>
        /// 获取所有祖先角色名称
        /// </summary>
        /// <param name="RoleId"></param>
        /// <returns></returns>
        IEnumerable<string> GetAncestorRoleNames(Guid RoleId);

        /// <summary>
        /// 获取指定用户所在的角色 （非继承关系）
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        IEnumerable<Role> GetRolesByUserIn(string userName);
    }
}
